/*package com.etrans.util;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.etrans.domain.VehicleDynamic;
import com.etrans.etsv5.lib.agent.ms.vo.ObjMSTrack;
import com.etrans.etsv5.lib.realtime.rdt.ObjOpera;
import com.etrans.etsv5.lib.realtime.rdt.ObjTrans;
import com.etrans.model.DataInterfaceService;
import com.etrans.v2.cache.local.LocalCache;
import com.etrans.v2.cache.local.LocalCacheManager;


public class EhcacheUtils {
	
	private static final Logger logger = LoggerFactory.getLogger(EhcacheUtils.class);
	
	public static VehicleDynamic getEhcacheObject(VehicleDynamic t,Integer vehicleId,LocalCacheManager localCacheManager){
		ObjMSTrack track = DataInterfaceService.agent.getLastTrack(vehicleId);
		LocalCache<VehicleDynamic> localCache = localCacheManager.getAndCreatePersistentCache(VehicleDynamic.class);
		if(track!=null){
			t.setGpsSpeed(track.getGpsSpeed());
			t.setGpsTime(track.getGpsTime());
			t.setLatitude(track.getLatitude());
			t.setLongitude(track.getLongitude());
			localCache.putValue(vehicleId, t);
		}
		
		return localCache.getValue(vehicleId);
	}
	
	
	public static ObjTrans getObjTransCache(LocalCacheManager localCacheManager,Integer vehicleId){
		ObjTrans objTrans = DataInterfaceService.agent.getLastTrans(vehicleId);
		logger.info("<:::::::::::::::::::::::::::>objTrans is what ?{}",objTrans!=null?objTrans.toString():"is null");
		LocalCache<ObjTrans> localCache = localCacheManager.getAndCreatePersistentCache(ObjTrans.class);
		// 二、获取can数据
		if (objTrans != null) {
			// 2.1,获取json字符串
			localCache.putValue(vehicleId, objTrans);
		}
		
		return localCache.getValue(vehicleId);
	}
	
	
	public static ObjOpera getObjOperaCache(LocalCacheManager localCacheManager,Integer vehicleId){
		ObjOpera objOpera = DataInterfaceService.agent.getLastOpera(vehicleId);
		logger.info("<:::::::::::::::::::::::::::>objOpera is what ?{}",objOpera!=null?objOpera.toString():"is null");
		LocalCache<ObjOpera> localCache = localCacheManager.getAndCreatePersistentCache(ObjOpera.class);
        //二、获取故障码原始数据
        if (objOpera != null) {
        	localCache.putValue(vehicleId, objOpera);
        }
		return localCache.getValue(vehicleId);
	}
}
*/